package com.todo.reward.infrastructure.mapper;

import com.todo.reward.infrastructure.entity.condition.RewardTemplateCondition;
import com.todo.reward.infrastructure.entity.po.RewardTemplatePO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author azhebuxing
 * @date 2025/1/21 16:20
 * @description
 */
@Mapper
public interface RewardTemplateMapper {

    /**
     * 根据ID查询模板
     */
    RewardTemplatePO queryRewardTemplateById(@Param("id")Long id);

    /**
     * 新增模板
     */
    int insertRewardTemplate(RewardTemplatePO rewardTemplate);

    /**
     * 批量新增模板
     */
    int insertBatch(@Param("entities") List<RewardTemplatePO> entities);

    /**
     * 更新模板
     */
    int updateRewardTemplate(RewardTemplatePO rewardTemplate);

    /**
     * 删除模板（逻辑删除）
     */
    int removeRewardTemplateById(@Param("id") Long id);


    List<RewardTemplatePO> queryRewardTemplateByCondition(RewardTemplateCondition condition);


    int queryRewardTemplateCount(RewardTemplateCondition condition);
}
